package com.bw.controller;

import com.bw.bean.Shang;
import com.bw.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @Autowired
    UserService userService;

    @RequestMapping("/list")
    public Shang t1(){
        return userService.get1();
    }

    @RequestMapping("/list2")
    public Shang t2(String name1){
        return userService.get2(name1);
    }

    @RequestMapping("/list3")
    public Shang t3(double money1){
        return userService.get3(money1);
    }

    @RequestMapping("/list4")
    public Shang t4(String date1,String date2){
        return userService.get4(date1,date2);
    }

    @RequestMapping("/list5")
    public int t5(Shang shang){
        return userService.myadd(shang);
    }

    @RequestMapping("/list6")
    public int t6(int id){
        return userService.del(id);
    }

    @RequestMapping("/list7")
    public int t7(double money1,int id1){
        return userService.myup(money1,id1);
    }
}
